package workforecast

class Forecast implements Comparable {
	
    int startWeek
	int startYear
	int endWeek
	int endYear
	
	boolean state

	static belongsTo = [user: User]
	
	SortedSet activities
	static hasMany = [activities: Activity]
	
    static constraints = {
		startWeek(size: 1..52)
		startYear(size:1900..3000)
		endWeek(size: 1..52)
		endYear(size:1900..3000)
    }

	@Override
	public int compareTo(Object o) {
		id.compareTo(o.id)
		
	}
}
